package cn.usian.client;


import cn.usian.common.R;
import cn.usian.entity.Employee;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "employeeservice",fallbackFactory = EmployeeClientFallbackFactory.class)
public interface EmployeeClient {

    @GetMapping("/employee/page")
    public R findPage(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int pageSize, @RequestParam(required = false) String name);
    @PostMapping("/employee")
    public R save(@RequestBody Employee employee);
}
